import java.util.Arrays;

public class Test5 {
    //现在给出两个数组：数组a："1,7,9,11,13,15,17,19"，数组b："2,4,6,8,10"，两个数组合并为数组c。
    public static void main(String[] args) {
        int a[] = {1, 7, 9, 11, 13, 15, 17, 19};
        int b[] = {2, 4, 6, 8, 10};
        int c[] = new int[a.length + b.length];

        System.out.print("a数组：");
        for (int i:a){
            System.out.print(i + "\t");
        }
        System.out.println();

        System.out.print("b数组：");
        for (int i:b){
            System.out.print(i + "\t");
        }

        for (int i = 0; i < a.length; i++) {
            c[i] = a[i];
        }
        for (int i = 0; i < b.length; i++) {
            c[a.length + i] = b[i];
        }
        System.out.println();
        System.out.print("c数组：");
        for (int num : c) {
            Arrays.sort(c);
            System.out.print(num + "\t");
        }

    }
}
